﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucNoticias.ascx.cs" Inherits="CoreInmobiliario.Frontend.UserControls.ucNoticias" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="~/UserControls/ucNoticia.ascx" tagname="Noticia" tagprefix="uc" %>

<div class="contentSeccion">
    <div class="titleSeccion">Noticias</div>    

    <asp:UpdatePanel ID="upLastNoticias" runat="server">
        <ContentTemplate>
            <asp:GridView ID="gvNoticia" runat="server" AutoGenerateColumns="false" EnablePersistedSelection="true" 
                DataKeyNames="NoticiaId" AllowPaging="false" AllowSorting="false" CssClass="gridViewUserControl" >  
                <HeaderStyle CssClass="headerGridView" />    
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Label ID="lblFecha" runat="server" Text='<%# Bind("Fecha", "{0:d}") %>' Font-Size="7"></asp:Label>
                            <br />
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("Titulo") %>' Font-Size="9" Font-Bold="true"></asp:Label>
                            <br />
                            <asp:LinkButton ID="lnkVerMas" runat="server" Text="Ver mas" 
                                onclick="lnkVerMas_Click" ></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>        
        </ContentTemplate>
    </asp:UpdatePanel>
    
    <div id="panelNoticia" class="panelPopup" style="display:none;">
        <uc:Noticia ID="popupNoticia" runat="server" Visible="true" />
    </div>

    <asp:HiddenField ID="targetNoticia" runat="server" />

    <asp:ModalPopupExtender ID="mpeNoticia" runat="server" 
        TargetControlID="targetNoticia"
        PopupControlID="panelNoticia" 
        BehaviorID="mpeNoticia"
        DropShadow="True"
        BackgroundCssClass="modalBackground">
    </asp:ModalPopupExtender>
</div>
